<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fast Mvc 演示</title>
<jsp:include page="/inc/inc.jsp" />
<script type="text/javascript">
	function addCate() {
		var name = $('#cate_name').val();
		if (sys.isEmpty(name))
			return;
		$.post('cate/add', {
			'cate.name' : name
		}, function(data) {
			if (data && data.success) {
				$('#cateFrame').get(0).src = "cate/list";
				$('#cate_name').val('');
			}
			alert(data.msg);
		}, 'json');
	}
</script>
</head>

<body style="margin-top: 20px; padding-left: 10px;">
	<h2>
		Fast MVC 演示用例 &nbsp; <small>- by Sylthas </small>
	</h2>
	<hr noshade="noshade"/>
	<div id="left">
		<div class="form">
			<h3>Category</h3>
			<table>
				<tr>
					<td align="right" valign="middle">&nbsp;[类别]&nbsp;</td>
					<td><input type="text" id="cate_name" name="cate.name"
						style="border: 1px #ccc dashed;" /></td>
				</tr>
				<tr>
					<td colspan="2" align="center"><input type="button"
						value="添加类别" onclick="addCate();" class="button" />
				</tr>
			</table>
		</div>
		<div id="cate">
			<iframe id="cateFrame" frameborder="0" src="cate/list"></iframe>
		</div>
	</div>
	<div id="mian">
		<iframe frameborder="0" src="cnt/show/1-4"></iframe>
	</div>
</body>
</html>
